﻿<!DOCTYPE html>
<html>
<head>
    <title>My Page</title>
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <script src="../../lib/XiaoFuMap.js" type="text/javascript"></script>
    <script type="text/javascript">        
        var map, control, layer, glayer;
        var movestart = false;
        var holdGeoPoint = null;
        var holdPoint = null;
        var holdCenter = null;
        var svgLayer_point;
        var svgLayer_location;
        $(document).ready(function () {
            var w = 1000;
            var h = 500;
            $("#MapContainer").width(w).height(h);
            map = new XiaoFu.Map("#MapContainer");
            layer = new XiaoFu.GoogleCacheLayer("http://mt{0}.google.cn/vt/lyrs=m@180000000&hl=zh-CN&gl=cn&src=app&x={1}&y={2}&z={3}&s=Gal");
            map.addLayer(layer);
            glayer = new XiaoFu.GoogleCacheLayer("http://mt{0}.google.cn/vt/lyrs=s@115&hl=zh-CN&gl=cn&src=app&x={1}&y={2}&z={3}&s=Gal");
            glayer.isBaseLayer = false;
            glayer.setVisiable(false);
            map.addLayer(glayer);
            svgLayer_point = new XiaoFu.SVGLayers("point");
            map.addLayer(svgLayer_point);
            svgLayer_location = new XiaoFu.SVGLayers("point");
            map.addLayer(svgLayer_location);
            $("#MapContainer").message();
            $("#MapContainer").message({ addMessage: { message: "Test1", timer: 5000, actionType: "normal", type: "info"} });
            $("#MapContainer").message({ addMessage: { message: "Test2", timer: 5000, actionType: "normal", type: "warn"} });
            $("#MapContainer").message({ addMessage: { message: "Test3", timer: 5000, actionType: "normal", type: "error"} });
            $("#MapContainer").message({ addMessage: { message: "Test4", timer: 5000, actionType: "normal", type: "info"} });
            $("#MapContainer").message({ addMessage: { message: "Test5", timer: 5000, actionType: "normal", type: "info"} });

            //$("#MapContainer").message().showMsg({ message: "Test", timer: 10000, actionType: "normal", type: "info" });
        });

        function showMessage() {
            $("#MapContainer").message({ addMessage: { message: "immediatelyMessage", timer: 5000, actionType: "immediately", type: "info"} });

        };
        function info() {
            $("#MapContainer").message({ addMessage: { message: "info", timer: 5000, actionType: "immediately", type: "info"} });

        };
        function warn() {
            $("#MapContainer").message({ addMessage: { message: "warn", timer: 5000, actionType: "immediately", type: "warn"} });

        };
        function error() {
            $("#MapContainer").message({ addMessage: { message: "error", timer: 5000, actionType: "immediately", type: "error"} });

        };
    
    </script>
</head>
<body>   
        
<div id="MapContainer" style="  z-index: 10000; border: 0px solid blue; position: relative; padding:0px; margin:0px;
        "></div>
        <input type="button" onclick="showMessage();" value="showMessage" />
        <input type="button" onclick="info();" value="info" />
        <input type="button" onclick="warn();" value="warn" />
        <input type="button" onclick="error();" value="error" />
      <!-- /page -->
</body>
</html>
